Publish internal modules separately for downstream reuse#3763
Merged
dai-chen merged 3 commits intoopensearch-project:feature/unified-pplfrom Jun 16, 2025
Merged
Conversation
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Member
|
Why not change the Group ID to |
Swiddis
approved these changes
Jun 12, 2025
Collaborator
I like being able to find the repo corresponding to a given Sonatype package as a 1-1 mapping, |
penghuo
reviewed
Jun 13, 2025
Signed-off-by: Chen Dai <daichen@amazon.com>
Collaborator
Author
|
@LantaoJin @Swiddis I decided to go with @peterzhuamazon Just checking if any concerns or procedures we should follow to publish multiple JARs from the SQL plugin to snapshot repository (https://aws.oss.sonatype.org/content/repositories/snapshots/)? The motivation for this can be found in the related issue above. |
9 tasks
LantaoJin
approved these changes
Jun 16, 2025
4f3cbc5
into
opensearch-project:feature/unified-ppl
20 checks passed
dai-chen
added a commit
to dai-chen/sql-1
that referenced
this pull request
Jun 24, 2025
…project#3763) * Add common Gradle task for all published modules Signed-off-by: Chen Dai <daichen@amazon.com> * Add publish workflow file Signed-off-by: Chen Dai <daichen@amazon.com> * Rename group ID from sql to query Signed-off-by: Chen Dai <daichen@amazon.com> --------- Signed-off-by: Chen Dai <daichen@amazon.com>
This was referenced Jul 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements Option A: Modular Publishing from the Granularity section of the design. It introduces the ability to publish internal modules (e.g.,
core,ppl,opensearch) as separate Maven artifacts. This enables downstream consumers such as Spark to depend only on the components they require.Current naming proposal (subject to feedback):
org.opensearch.query— places all artifacts under a singlequery/folder in the Maven repository.unified-query-<module>, e.g., unified-query-core, unified-query-ppl.Local Publishing Test
Example after running the local publish command:
$ ./gradlew publishUnifiedQueryPublicationToMavenLocal $ pwd ~/.m2/repository/org/opensearch $ tree . . ├── plugin <-- no impact on plugin publishing │ └── opensearch-sql-plugin │ └── 3.1.0.0-SNAPSHOT └── query ├── unified-query-common │ └── 3.1.0.0-SNAPSHOT ├── unified-query-core │ └── 3.1.0.0-SNAPSHOT ├── unified-query-opensearch │ └── 3.1.0.0-SNAPSHOT ├── unified-query-ppl │ └── 3.1.0.0-SNAPSHOT ├── unified-query-protocol │ └── 3.1.0.0-SNAPSHOT └── unified-query-sql └── 3.1.0.0-SNAPSHOTSpark Integration Test
Verified dependency resolution and query execution using ongoing Calcite 2.19 PR code and local Maven artifacts.
# Checkout Calcite backport draft PR #3752 and patch this PR changes $ git fetch upstream pull/3752/head:pr-3752 $ git checkout pr-3752 # Build by JDK 11 and publish 2.19 artifacts locally $ java -version openjdk version "11.0.25" 2024-10-15 LTS OpenJDK Runtime Environment Corretto-11.0.25.9.1 (build 11.0.25+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.25.9.1 (build 11.0.25+9-LTS, mixed mode) $ ./gradlew clean publishUnifiedQueryPublicationToMavenLocal . ├── plugin │ └── opensearch-sql-plugin └── query ├── unified-query-common │ └── 2.19.3.0-SNAPSHOT ├── unified-query-core │ └── 2.19.3.0-SNAPSHOT ├── unified-query-opensearch │ └── 2.19.3.0-SNAPSHOT ├── unified-query-ppl │ └── 2.19.3.0-SNAPSHOT ├── unified-query-protocol │ └── 2.19.3.0-SNAPSHOT └── unified-query-sql # Add dependency to Spark: https://github.com/dai-chen/opensearch-spark/tree/verify-unified-ppl-dependency resolvers ++= Seq( "Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository", "OpenSearch Snapshots" at "https://aws.oss.sonatype.org/content/repositories/snapshots/", "JitPack" at "https://jitpack.io" ), libraryDependencies ++= Seq( "com.amazonaws" % "aws-java-sdk" % "1.12.397" % "provided" exclude ("com.fasterxml.jackson.core", "jackson-databind"), ... "org.opensearch.query" % "unified-query-ppl" % "2.19.3.0-SNAPSHOT" exclude("org.opensearch.query", "unified-query-protocol") exclude("org.opensearch.query", "unified-query-opensearch")), # Run IT with new FlintSparkPPLCalciteParser registered to Spark extension 25/06/11 19:40:10 INFO FlintSparkPPLCalciteParser: PPL => SparkSQL PPL query: source = spark_catalog.default.flint_ppl_test | eval f = GET_FORMAT(DATE, 'USA') | fields f SQL query: SELECT `GET_FORMAT`('DATE', 'USA') `f` FROM `spark_catalog`.`default`.`flint_ppl_test`Related Issues
Resolves part 1 in #3734.
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.